package com.example.test.enums;

/**
 * 全局http错误编码
 *
 * @author tangn
 */
public enum ErrorCodeEnum {
    /**
     * 错误码
     */
    ERROR(9999, "系统异常"),
    HTTP_CONNECTION_OVERTIME(9998, "连接超时"),
    FREQUENTLY_REQUEST(9003, "操作频繁"),
    INVALID_RSA_KEY(9002, "超时失效"),
    TOKEN_TIMEOUT(9005, "token失效"),
    INVALID_PARAMS(9001, "非法参数"),
    INVALID_LOGIN_USER(9006, "该登录用户非企业内部用户，为企业外部联系人"),
    SIGN_ERROR(9000, "签名错误"),
    INVALID_STATUS(9004, "状态不符"),

    OK(200, "请求通过"),
    NO(201, "请求不通过"),
    TIP(202, "提示"),


    SORT_NOT_DUPLICATE(4001, "排序序号重复");


    private Integer code;

    private String message;

    ErrorCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    public Integer getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
